home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / DBCTRLS.HPP < prev    next >
C/C++ Source or Header  |  1997-02-13  |  45KB  |  1,236 lines

  1. //----------------------------------------------------------------------------
  2. // DBCtrls.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: DBCtrls.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DBCtrlsHPP
  6. #define DBCtrlsHPP
  7. //----------------------------------------------------------------------------
  8. #include <Buttons.hpp>
  9. #include <Mask.hpp>
  10. #include <DBTables.hpp>
  11. #include <DB.hpp>
  12. #include <ExtCtrls.hpp>
  13. #include <StdCtrls.hpp>
  14. #include <Menus.hpp>
  15. #include <Graphics.hpp>
  16. #include <Forms.hpp>
  17. #include <Controls.hpp>
  18. #include <Classes.hpp>
  19. #include <Messages.hpp>
  20. #include <Windows.hpp>
  21. #include <SysUtils.hpp>
  22. #include <System.hpp>
  23. #pragma warn -par
  24. #pragma warn -hid 
  25. #pragma warn -inl
  26.  
  27. namespace Dbctrls
  28. {
  29. //-- type declarations -------------------------------------------------------
  30. class __declspec(delphiclass) TPaintControl;
  31. class __declspec(pascalimplementation) TPaintControl : public System::TObject
  32. {
  33.     typedef System::TObject inherited;
  34.     
  35. private:
  36.     Controls::TWinControl* FOwner;
  37.     System::AnsiString FClassName;
  38.     HWND FHandle;
  39.     void *FObjectInstance;
  40.     void *FDefWindowProc;
  41.     bool FCtl3dButton;
  42.     HWND __fastcall GetHandle(void);
  43.     void __fastcall SetCtl3DButton(bool Value);
  44.     void __fastcall WndProc(Messages::TMessage &Message);
  45.     
  46. public:
  47.     __fastcall TPaintControl(Controls::TWinControl* Owner, const System::AnsiString ClassName);
  48.     __fastcall virtual ~TPaintControl(void);
  49.     void __fastcall DestroyHandle(void);
  50.     __property bool Ctl3DButton = {read=FCtl3dButton, write=SetCtl3DButton, nodefault};
  51.     __property HWND Handle = {read=GetHandle, nodefault};
  52. };
  53.  
  54. class __declspec(delphiclass) TDBEdit;
  55. class __declspec(pascalimplementation) TDBEdit : public Mask::TCustomMaskEdit
  56. {
  57.     typedef Mask::TCustomMaskEdit inherited;
  58.     
  59. private:
  60.     Dbtables::TFieldDataLink* FDataLink;
  61.     Controls::TControlCanvas* FCanvas;
  62.     TAlignment FAlignment;
  63.     bool FFocused;
  64.     void __fastcall DataChange(System::TObject* Sender);
  65.     void __fastcall EditingChange(System::TObject* Sender);
  66.     System::AnsiString __fastcall GetDataField(void);
  67.     Db::TDataSource* __fastcall GetDataSource(void);
  68.     Db::TField* __fastcall GetField(void);
  69.     bool __fastcall GetReadOnly(void);
  70.     POINT __fastcall GetTextMargins(void);
  71.     void __fastcall SetDataField(const System::AnsiString Value);
  72.     void __fastcall SetDataSource(Db::TDataSource* Value);
  73.     void __fastcall SetFocused(bool Value);
  74.     HIDESBASE void __fastcall SetReadOnly(bool Value);
  75.     void __fastcall UpdateData(System::TObject* Sender);
  76.     HIDESBASE MESSAGE void __fastcall WMCut(Messages::TMessage &Message);
  77.     HIDESBASE MESSAGE void __fastcall WMPaste(Messages::TMessage &Message);
  78.     HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
  79.     HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
  80.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  81.     MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
  82.     
  83. protected:
  84.     virtual void __fastcall Change(void);
  85.     virtual bool __fastcall EditCanModify(void);
  86.     virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
  87.     virtual void __fastcall KeyPress(char &Key);
  88.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  89.         );
  90.     virtual void __fastcall Reset(void);
  91.     
  92. public:
  93.     __fastcall virtual TDBEdit(Classes::TComponent* AOwner);
  94.     __fastcall virtual ~TDBEdit(void);
  95.     __property Db::TField* Field = {read=GetField, nodefault};
  96.     
  97. __published:
  98.     __property AutoSelect ;
  99.     __property AutoSize ;
  100.     __property BorderStyle ;
  101.     __property CharCase ;
  102.     __property Color ;
  103.     __property Ctl3D ;
  104.     __property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
  105.     __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
  106.     __property DragCursor ;
  107.     __property DragMode ;
  108.     __property Enabled ;
  109.     __property Font ;
  110.     __property ImeMode ;
  111.     __property ImeName ;
  112.     __property MaxLength ;
  113.     __property ParentColor ;
  114.     __property ParentCtl3D ;
  115.     __property ParentFont ;
  116.     __property ParentShowHint ;
  117.     __property PasswordChar ;
  118.     __property PopupMenu ;
  119.     __property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, default=0};
  120.     __property ShowHint ;
  121.     __property TabOrder ;
  122.     __property TabStop ;
  123.     __property Visible ;
  124.     __property OnChange ;
  125.     __property OnClick ;
  126.     __property OnDblClick ;
  127.     __property OnDragDrop ;
  128.     __property OnDragOver ;
  129.     __property OnEndDrag ;
  130.     __property OnEnter ;
  131.     __property OnExit ;
  132.     __property OnKeyDown ;
  133.     __property OnKeyPress ;
  134.     __property OnKeyUp ;
  135.     __property OnMouseDown ;
  136.     __property OnMouseMove ;
  137.     __property OnMouseUp ;
  138.     __property OnStartDrag ;
  139. public:
  140.     /* TWinControl.CreateParented */ __fastcall TDBEdit(HWND ParentWindow) : Mask::TCustomMaskEdit(ParentWindow
  141.         ) { }
  142.     
  143. };
  144.  
  145. class __declspec(delphiclass) TDBText;
  146. class __declspec(pascalimplementation) TDBText : public Stdctrls::TCustomLabel
  147. {
  148.     typedef Stdctrls::TCustomLabel inherited;
  149.     
  150. private:
  151.     Dbtables::TFieldDataLink* FDataLink;
  152.     void __fastcall DataChange(System::TObject* Sender);
  153.     System::AnsiString __fastcall GetDataField(void);
  154.     Db::TDataSource* __fastcall GetDataSource(void);
  155.     Db::TField* __fastcall GetField(void);
  156.     System::AnsiString __fastcall GetFieldText(void);
  157.     void __fastcall SetDataField(const System::AnsiString Value);
  158.     void __fastcall SetDataSource(Db::TDataSource* Value);
  159.     MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
  160.     
  161. protected:
  162.     virtual System::AnsiString __fastcall GetLabelText(void);
  163.     virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
  164.         );
  165.     virtual void __fastcall SetAutoSize(bool Value);
  166.     
  167. public:
  168.     __fastcall virtual TDBText(Classes::TComponent* AOwner);
  169.     __fastcall virtual ~TDBText(void);
  170.     __property Db::TField* Field = {read=GetField, nodefault};
  171.     
  172. __published:
  173.     __property Align ;
  174.     __property Alignment ;
  175.     __property AutoSize ;
  176.     __property Color ;
  177.     __property System::AnsiString DataField = {read=GetDataField, write=SetDataField, nodefault};
  178.     __property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
  179.     __property DragCursor ;
  180.     __property DragMode ;
  181.     __property Enabled ;
  182.     __property Font ;
  183.     __property ParentColor ;
  184.     __property ParentFont ;
  185.     __property ParentShowHint ;
  186.     __property PopupMenu ;
  187.     __property Transparent ;
  188.     __property ShowHint ;
  189.     __property Visible ;
  190.     __property WordWrap ;
  191.     __property OnClick ;
  192.     __property OnDblClick ;
  193.     __property OnDragDrop ;
  194.     __property OnDragOver ;
  195.     __property OnEndDrag ;
  196.     __property OnMouseDown ;
  197.     __property OnMouseMove ;
  198.     __property OnMouseUp ;
  199.     __property OnStartDrag ;
  200. };
  201.  
  202. class __declspec(delphiclass) TDBCheckBox;
  203. class __declspec(pascalimplementation) TDBCheckBox : public Stdctrls::TCustomCheckBox
  204. {
  205.     typedef Stdctrls::TCustomCheckBox inherited;
  206.     
  207. private:
  208.     Dbtables::TFieldDataLink* FDataLink;
  209.     System::AnsiString FValueCheck;
  210.     System::AnsiString FValueUncheck;
  211.     TPaintControl* FPaintControl;
  212.     void __fastcall DataChange(System::TObject* Sender);
  213.     System::AnsiString __fastcall GetDataField(void);
  214.     Db::TDataSource* __fastcall GetDataSource(void);
  215.     Db::TField* __fastcall GetField(void);
  216.     Stdctrls::TCheckBoxState __fastcall GetFieldState(void);
  217.     bool __fastcall GetReadOnly(void);
  218.     void __fastcall SetDataField(const System::AnsiString Value);
  219.     void __fastcall SetDataSource(Db::TDataSource* Value);
  220.     void __fastcall SetReadOnly(bool Value);
  221.     void __fastcall SetValueCheck(const System::AnsiString Value);
  222.     void __fastcall SetValueUncheck(const System::AnsiString Value);
  223.     void __fastcall UpdateData(System::TObject* Sender);
  224.     bool __fastcall ValueMatch(const System::AnsiString ValueList, const System::AnsiString Value);
  225.     HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
  226.     HIDESBASE MESSAGE void __fastcall CMExit(Messages::TWMNoParams &Message);
  227.     MESSAGE void __fastcall CMGetDataLink(Messages::TMessage &Message);
  228.     
  229. protected:
  230.     virtual void __fastcall Toggle(void);
  231.     vir